﻿
@model KRM.Core.tblOrder
@{
    ViewBag.Title = "Edit special instructions";
    Layout = "~/Views/Shared/_PopupLayout.cshtml"; 
}

<div class="padding10">
    <form action="/orderview/editinstructions" method="POST">
        @Html.Partial("Partial/_MessageResult")
        <input type="hidden" name="original" value="@Model.SpecialInstructions"/>
        <input type="hidden" name="orderid" value="@Model.OrderID"/>
        <fieldset>
            <legend>Current special instructions</legend>
            <textarea name="newsi" class="input-block-level" style="height: 150px" readonly="readonly" id="original">@Model.SpecialInstructions</textarea>
            @*<div style="height: 150px; overflow: auto" id="original">
                @Html.Raw((Model.SpecialInstructions!=null)?Model.SpecialInstructions.Replace("\r\n" , "<br>"):"")
            </div>*@
        </fieldset>
        <fieldset>
            <legend>New instructions</legend>
            <textarea name="originalNew" rows="7" class="input-block-level originalNew" style="border-color: rgb(223, 223, 223)"></textarea>
        </fieldset>
        @if (ViewBag.Warning != null)
        {
            <div style="color: red; font-weight: bold">
                @ViewBag.Warning
            </div>
        }
        <div style="text-align: right; padding: 10px 20px 0 0">
            <button class="btn btn-primary w90" type="button" onclick="SIAddTo('top')">Add To Top</button>
            <button class="btn btn-primary" type="button" onclick="SIAddTo('bottom')">Add To Bottom</button>
            <button class="btn btn-primary w90" type="submit">Ok</button>
            <button class="btn w90" onclick="javascript:window.close();">Cancel</button>
        </div>
    </form>
</div>